Techniques for using a transaction log created by a master to perform replication with another master or a slave are recently being proposed. In particular, a technique for performing replication by synchronizing the other master or the slave with the master is proposed. In this case, a transaction log shows a history of changes made to a database.
FIG. 1 shows two methods of performing replication by synchronizing another master or a slave with a master. In a first method (a method depicted by solid lines), a transaction log generated by a master is transmitted to another master or a slave, and after an update of a database is completed by the other master or the slave, an ACK is returned to the master. Subsequently, a commit to an object transaction is completed.
In the first method, since the commit to the object transaction is not completed until the update of the database by the other master or the slave is completed, processing of an entire system is slowed down. FIG. 1 shows a second method (a method depicted by dotted lines) as an improvement of the first method.
In the second method, at a point when reception of a transaction log by the other master or the slave is completed, an ACK is returned to the master regardless of whether or not the transaction log is applied. Therefore, according to the second method, the time required to complete the commit to the transaction can be reduced and performance of the overall system can be improved.
However, with the second method, when a retrieval process occurs at the other master or the slave before the replication is completed, there is a possibility that a data content which differs from the master may be referred to. As a countermeasure, a method may sometimes be used in which execution of the retrieval process that has occurred at the other master or the slave is put on standby until the replication is completed (WO 2010/106991).